package yxy.game.pm2.module.union;

public class UnionJoinRule {

	static public UnionJoinRule defaultUnionJoinRule = new UnionJoinRule();
	static {
		defaultUnionJoinRule.setAudit(true);
		defaultUnionJoinRule.setCondition(JoinCondition.LEVEL);
		defaultUnionJoinRule.setValue(15);
	}

	static public enum JoinCondition {
		LEVEL(1), // 等级
		POWER(2), // 战力
		;

		private int number;

		private JoinCondition(int number) {
			this.number = number;
		}

		public int getNumber() {
			return number;
		}

		static public JoinCondition forNumber(int number) {
			switch (number) {
			case 1:
				return LEVEL;
			case 2:
				return POWER;
			default:
				return null;
			}
		}
	}

	private boolean audit;// 需要审核
	private JoinCondition condition;// 加入条件
	private long value;// 加入数值

	public boolean isAudit() {
		return audit;
	}

	public void setAudit(boolean audit) {
		this.audit = audit;
	}

	public JoinCondition getCondition() {
		return condition;
	}

	public void setCondition(JoinCondition condition) {
		this.condition = condition;
	}

	public long getValue() {
		return value;
	}

	public void setValue(long value) {
		this.value = value;
	}

}
